package com.joseph.websocket.handler;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import io.netty.channel.ChannelPromise;
import io.netty.handler.codec.ByteToMessageCodec;
import io.netty.handler.codec.ByteToMessageDecoder;
import org.apache.commons.lang3.time.StopWatch;

import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.util.List;

/**
 * 建立WS连接前用户身份验证
 */
public class T1InboundHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {

        ctx.channel().config().getWriteBufferWaterMark().high();
        ctx.channel().config().setWriteBufferHighWaterMark(1000000);
        System.out.println("kk" + msg);
        super.channelRead(ctx, msg);
    }
}
